package com.company.cloud.common.mq.redis.client.consumer.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface MQRedisConsumer {
    public static final String DEFAULT_GROUP = "DEFAULT";   // default group
    public static final String EMPTY_GROUP = "";            // empty group means consume broadcase message, will replace by uuid

    /**
     * @return
     */
    String topic();
    
    /**
     * @return
     */
    String group() default DEFAULT_GROUP;

    /**
     * @return
     */
    String consumer() default "";
    
    /**
     * @return
     */
    long count() default 1L;
    
    /**
     * @return Seconds(秒)
     */
    long blockTimeout() default 0L;
    
    /**
     * @return 是否自动确认
     */
    boolean autoAck() default false;
    
    /**
     * @return
     */
    long runTimeout() default 0L;
}
